home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_136 / paste / paste.diff < prev    next >
Text File  |  1992-05-06  |  3KB  |  165 lines

  1. 38c38
  2. <  *    \b,\f, and \r.  (Just because *I* can't imagine why you'd want
  3. ---
  4. >  *    \b,\f,\r, and \v.  (Just because *I* can't imagine why you'd want
  5. 47,50c47
  6. < /* Modified to run under MINIX 1.1
  7. <  * by David O. Tinker  (416) 978-3636 (utgpu!dtinker)
  8. <  * Sept. 19, 1987
  9. <  */
  10. ---
  11. > #include <stdio.h>
  12. 52,54c49
  13. < #include <stdio.h>
  14. < #include "../include/errno.h"  /* make sure errno.h is available */
  15. < #include "../include/ctype.h"  /* make sure ctype.h is available */
  16. ---
  17. > extern int errno;
  18. 56c51
  19. < extern int errno;
  20. ---
  21. > #define CPM
  22. 58,60d52
  23. < #define MINIX   /* as opposed to C86, or AZTEC in my case */
  24. <         /* just in case I want to compile under DOS sometime */
  25. 72c64,65
  26. < #define DEL             '\177'
  27. ---
  28. > #define    VT        '\v'
  29. > #define    DEL        '\177'
  30. 77a71
  31. > #define COMMAND        "paste"
  32. 79,80c73
  33. < char *cmdnam,
  34. <      toupper();
  35. ---
  36. > char *cmdnam;
  37. 92a86,88
  38. > #ifdef CPM
  39. >     cmdnam = COMMAND;
  40. > #else
  41. 93a90
  42. > #endif
  43. 95,96d91
  44. <   if(argc >= 2) {
  45. 105c100
  46. <         switch(toupper(argv[0][1]))
  47. ---
  48. >         switch(argv[0][1])
  49. 106a102
  50. >             case 'd':
  51. 116a113
  52. >             case 's':
  53. 127d123
  54. <   }
  55. 129,131d124
  56. <   else
  57. <         prerr(USAGE,"");
  58. 142,143d134
  59. <         _cleanup();
  60. <         exit(0);
  61. 318d308
  62. <                 _cleanup();
  63. 365d354
  64. <             _cleanup();
  65. 391d379
  66. <         _cleanup();
  67. 409a398
  68. >     register char *strout;
  69. 411c400
  70. <     register char *strout;
  71. ---
  72. >     strout = strptr;    /* Start at the same place, anyway */
  73. 413,414d401
  74. <     strout = strptr;    /* Start at the same place, anyway */
  75. 422,423c409
  76. <             switch(toupper(*strptr))
  77. ---
  78. >             switch(*strptr)
  79. 428a415,416
  80. >                 case 't':
  81. > #ifdef CPM
  82. 429a418
  83. > #endif
  84. 432a422,423
  85. >                 case 'n':
  86. > #ifdef CPM
  87. 433a425
  88. > #endif
  89. 436a429,430
  90. >                 case 'b':
  91. > #ifdef CPM
  92. 437a432
  93. > #endif
  94. 440a436,437
  95. >                 case 'f':
  96. > #ifdef CPM
  97. 441a439
  98. > #endif
  99. 444a443,444
  100. >                 case 'r':
  101. > #ifdef CPM
  102. 445a446
  103. > #endif
  104. 449,454c450,455
  105. <                 default:
  106. <                     *strout++ = *strptr;
  107. <             }
  108. <             
  109. <             strptr++;
  110. <         }
  111. ---
  112. >                 case 'v':
  113. > #ifdef CPM
  114. >                 case 'V':
  115. > #endif
  116. >                     *strout++ = VT;
  117. >                     break;
  118. 456,458c457,462
  119. <     }
  120. <     *strout = '\0';    /* Heaven forfend that we forget this! */
  121. < }
  122. ---
  123. >                 default:
  124. >                     *strout++ = *strptr;
  125. >             }
  126. >             
  127. >             strptr++;
  128. >         }
  129. 459a464,467
  130. >     }
  131. >     *strout = '\0';    /* Heaven forfend that we forget this! */
  132. > }
  133. 467c475
  134. <             fprintf(stderr,"%s : Usage: %s [-s] [-d<delimiter>] file1 file2 ...\n",cmdnam,cmdnam);
  135. ---
  136. >             fprintf(stderr,"%s : Usage: %s [-s] [-d<delimiterstring>] file1 file2 ...\n",cmdnam,cmdnam);
  137. 482d489
  138. <     _cleanup();
  139. 485,503d491
  140. < char toupper(c)            /* This is non-standard, but it works */
  141. < char c;
  142. < {
  143. <    char x;
  144. <    if (isalpha(c)) {
  145. <       if (c > 'Z') x = (c - ' ');
  146. <       else x = c;
  147. <    }
  148. <    else {
  149. <       if (isdigit(c))
  150. <           x = c;
  151. <       else x = '\0';        /* this will terminate a string
  152. <                  * at any character other than a
  153. <                  * letter or numeral.            */ 
  154. <    }
  155. <    return (x);
  156. < }
  157.